<?php


namespace app\controllers;


use app\models\request\ReqApplyAct;
use app\models\request\ReqUpdateInfo;
use app\models\UserDto;
use app\service\ApplyService;
use app\service\UserService;

class UpdateInfoController extends BaseJsonController
{
    /**
     * @param $req ReqUpdateInfo
     * @param $userInfo UserDto
     * @throws \app\exception\OaException
     */
    public function doService($req,$userInfo)
    {

        $req->setUserId($userInfo->getUserId());
        $service  = new UserService();
        return $service->updateInfo($req);
    }
    protected function injectionReq()
    {
        return new ReqUpdateInfo();
    }
    public function needLogin(){
        return true;
    }
}